import Vue from 'vue'
import Router from 'vue-router'
import Home from "../components/Home";
import Login from "../components/common/Login";
import Index from "../components/common/Index";
import Register from "../components/common/Register";
import Course from "../components/common/Course";
import CourseDetail from "../components/common/CourseDetail";
import Cart from "../components/common/Cart";
import Mypage from "../components/common/Mypage";
import Order from "../components/common/Order";
import OrderSuccess from "../components/common/OrderSuccess";
import OrderList from "../components/common/OrderList";

Vue.use(Router);

export default new Router({
    mode:"history",
    routes: [
        {
            path: '/',
            name: "home",
            component: Home
        },
        {
            path: '/home',
            name: "home",
            component: Home
        },
        {
            path: '/home/login',
            name: "login",
            component: Login
        },
        {
            path: '/index',
            name: "index",
            component: Index
        },
        {
            path: '/user/register',
            name: "register",
            component: Register
        },
        {
            path: '/course/category',
            name: "course",
            component: Course
        },
        {
            path: '/course/list_filter',
            name: "CourseDetail",
            component: CourseDetail
        },
        {
            path: '/course/detail/:id',
            name: "CourseDetail",
            component: CourseDetail
        },
        {
            path: '/cart',
            name: "cart",
            component: Cart
        },
        {
            path: '/mypage',
            name: "mypage",
            component:Mypage
        },
        {
            path: '/order',
            name: "order",
            component:Order
        },
        {
            path: '/payments/result',
            name: "OrderSuccess",
            component:OrderSuccess
        },
        {
            path: '/order/list',
            name: "OrderList",
            component:OrderList
        },
    ]
})
